﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IDAL;
using DataMode;

namespace DAL
{
    class AdminAdmin:IAdminAdmin
    {
        DataModeDataContext ctx = new DataModeDataContext();


        public bool CheckLogin(string username, string password)
        {
            int count = (from a in ctx.admin
                             where a.admin_name == username && a.admin_password == password
                             select a).Count();
            if (count == 0)
                return false;
            else
                return true;
        }
    }
}
